package com.hopes.bizz.risk.common.constant;


import com.hopes.bizz.common.core.util.StringUtils;

/**
 * 消息分组
 * 不要超过20个字符否则消息无法推送
 */
public enum MessageGroupEnum {
    /**
     * 代办任务
     */
    todo_task,
    /**
     * sos报警
     */
    sos_alarm("SOS报警", "/plLocationSosAlarm/list", null),
    /**
     * 双体系检查
     */
    risk_hidden_check("双体系检查", "/risk/newRight/riskPointCheckTask", "pagesMechanism/riskPointHiddenCheckTaskList/riskPointHiddenCheckTaskList"),
    /**
     * 隐患确认
     */
    hid_confirm("隐患确认", "/hid/dangerConfirm", "pagesHidden/hidHiddenDangerTab/hidHiddenDangerTab?hidStatus=20"),
    /**
     * 隐患整改
     */
    hid_rectify("隐患整改", "/hid/dangerRectification", "pagesHidden/hidHiddenDangerTab/hidHiddenDangerTab?hidStatus=40"),
    /**
     * 隐患验收
     */
    hid_acceptance("隐患验收", "/hid/dangerAcceptance", "pagesHidden/hidHiddenDangerTab/hidHiddenDangerTab?hidStatus=50"),
    /**
     * 检查任务
     */
    risk_checklist_check("检查任务", "/id/hidTask", "pagesHidden/hidTaskList/hidTaskList"),
    /**
     * 线上培训
     */
    fac_train("线上培训", "/fac/train-online-plan", "pagesTrain/facEmployeeTrainTab/facEmployeeTrainTab"),
    /**
     * 线上考试
     */
    fac_exam("线上考试", "/fac/fac-exam-plan", "pagesTrain/facEmployeeExamTab/facEmployeeExamTab"),
    /**
     * 企业资质证书到期提醒
     */
    company_cert_expire,
    /**
     * 特种设备作业人员证书到期提醒
     */
    special_equ_cert_expire,
    /**
     * 特种作业人员证书到期提醒
     */
    special_job_cert_expire,
    /**
     * 安全管理人员证书到期提醒
     */
    safety_manager_cert_expire,
    /**
     * 证书到期
     */
    cert_expire,
    /**
     * 特种设备登记证到期提醒
     */
    special_equ_registration_cert_expire,
    /**
     * 特种设备检验报告到期提醒
     */
    special_equ_inspection_report_expire,
    ;

    MessageGroupEnum() {

    }

    MessageGroupEnum(String name, String webPage, String wxPage) {
        this.name = name;
        this.webPage = webPage;
        this.wxPage = wxPage;
    }

    String name;
    String webPage;
    String wxPage;


    public String getName() {
        return this.name;
    }

    public String getWebPage() {
        return webPage;
    }

    public String getWxPage() {
        if (StringUtils.isBlank(wxPage)) {
            return "pages/main/message/message";
        }
        return wxPage;
    }
}
